<template>
  <div class="app">
    <h1>我是App组件（祖）</h1>

    <Suspense>
      <template #default>
        <Child />
      </template>
      <template #fallback>
        <h3>加载中.....</h3>
      </template>
    </Suspense>
  </div>
</template>

<script>
// import Child from "@/components/Child";
import { defineAsyncComponent } from "vue";
const Child = defineAsyncComponent(() => import("./components/Child.vue"));

export default {
  name: "App",
  components: { Child },
};
</script>

<style>
.app {
  background-color: pink;
  padding: 10px;
}
</style>